package io.mqttpush.mqttserver;

import io.mqttpush.mqttserver.middle.TcpServer;

/**
 * @author tianzhenjiu
 */
public class BootServer {

	public static void main(String[] args) {
		
		
		Integer port=null;
		if(args!=null&&args.length>0) {

			try {
				port=Integer.parseInt(args[0]);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}



		Runtime.getRuntime().addShutdownHook(new Thread(()->{
			System.out.println("被关闭了");
		}));

		new TcpServer().start(port);

		
	}

}
